<!DOCTYPE html>
<html lang="en">
<head>
    <script src="/static/js/dev.js"></script>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--bootstrap插件-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="/static/plugin/element-ui/element-ui.css" rel="stylesheet"/>
    <!--字体插件-->
    <link href="/static/plugin/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <!--common-->
    <link href="/static/css/common.css" rel="stylesheet"/>
    <link href="/static/css/common-element-plus.css" rel="stylesheet"/>
    <link href="/static/css/common_biz.css" rel="stylesheet"/>

    <title>登录会话</title>
    <style>
    </style>
</head>
<body class="skin-default">
<div id="app" class="element-app-box">

    <!-- 查询条件 -->
    <el-row :gutter="15">
        <el-col :span="24">
            <div class="grid-content">
                <el-form :inline="true" :model="searchCondition">
                    <el-form-item label="主键"  >
                        <el-input v-model="searchCondition.id" placeholder=""></el-input>
                    </el-form-item>
                    <el-form-item label="用户id"  >
                        <el-input-number v-model="searchCondition.userId"  :min="0" :max="2147483647" :step="1" :controls="false" ></el-input-number>
                    </el-form-item>
                    <el-form-item label="令牌"  >
                        <el-input v-model="searchCondition.token" placeholder=""></el-input>
                    </el-form-item>
                    <el-form-item label="令牌生效时间" v-if="moreConditionFlag" >
                        <el-date-picker v-model="searchCondition.signTime" type="date" ></el-date-picker>
                    </el-form-item>
                    <el-form-item label="令牌过期时间" v-if="moreConditionFlag" >
                        <el-date-picker v-model="searchCondition.expireTime" type="date" ></el-date-picker>
                    </el-form-item>
                    <el-form-item label="状态" v-if="moreConditionFlag" >
                        <el-input-number v-model="searchCondition.tokenStatus"  :min="0" :max="2147483647" :step="1" :controls="false" ></el-input-number>
                    </el-form-item>
                    <el-form-item label="设备标识" v-if="moreConditionFlag" >
                        <el-input v-model="searchCondition.deviceAddr" placeholder=""></el-input>
                    </el-form-item>
                    <el-form-item label="设备类型" v-if="moreConditionFlag" >
                        <el-input-number v-model="searchCondition.deviceType"  :min="0" :max="2147483647" :step="1" :controls="false" ></el-input-number>
                    </el-form-item>
                    <el-form-item label="版本号" v-if="moreConditionFlag" >
                        <el-input v-model="searchCondition.deviceVersion" placeholder=""></el-input>
                    </el-form-item>
                    <el-form-item label="客户端ip" v-if="moreConditionFlag" >
                        <el-input v-model="searchCondition.clientIp" placeholder=""></el-input>
                    </el-form-item>
                    <el-form-item label="服务端ip" v-if="moreConditionFlag" >
                        <el-input v-model="searchCondition.serverIp" placeholder=""></el-input>
                    </el-form-item>
                    <el-form-item label="创建人id" v-if="moreConditionFlag" >
                        <el-input-number v-model="searchCondition.createUserId"  :min="0" :max="2147483647" :step="1" :controls="false" ></el-input-number>
                    </el-form-item>
                    <el-form-item label="更新人id" v-if="moreConditionFlag" >
                        <el-input-number v-model="searchCondition.updateUserId"  :min="0" :max="2147483647" :step="1" :controls="false" ></el-input-number>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" link @click="moreConditionFlag = true" v-if="!moreConditionFlag">更多条件</el-button>
                        <el-button type="primary" link @click="moreConditionFlag = false" v-if="moreConditionFlag">收起条件</el-button>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" @click="list_search"><i class="fa fa-search" aria-hidden="true"></i>&nbsp;查询</el-button>
                    </el-form-item>
                </el-form>
            </div>
        </el-col>
    </el-row>


    <!-- 按钮区 -->
    <el-row :gutter="15">
        <el-col :span="24">
            <div class="grid-content">
                <el-button type="primary" plain
                        size="default"
                        @click="list_add"
                        
                >新增</el-button>
                <el-button type="danger" plain
                        size="default"
                        @click="list_delete_batch"
                        
                >删除</el-button>
                <el-button type="warning" plain
                        size="default"
                        @click="reloadPage"
                        
                >刷新</el-button>
            </div>
        </el-col>
    </el-row>

    <!-- 数据表格 -->
    <el-row :gutter="15">
        <el-col :span="24">
            <div class="grid-content">
                <jo-el-table :url="tableDataUrl" :ref="joTableRef" :search-param="searchCondition" first-column="checkbox" :page-size="10" >
                    <template #default="scope">
                        <el-table :ref="tableRef" :data="scope.data" header-cell-class-name="jo-el-table-header" @sort-change="list_table_sort">
                            <el-table-column type="selection" prop="selection" width="50" label="#" header-align="center" align="center"></el-table-column>
                            <el-table-column prop="id" min-width="100" header-align="left" align="left"  sortable="custom" >
                                <template #header="scope"><span title="">主键</span></template>
                            </el-table-column>
                            <el-table-column prop="userId" min-width="100" header-align="left" align="left"  sortable="custom" >
                                <template #header="scope"><span title="">用户id</span></template>
                            </el-table-column>
                            <el-table-column prop="token" min-width="180" header-align="left" align="left"   >
                                <template #header="scope"><span title="">令牌</span></template>
                            </el-table-column>
                            <el-table-column prop="signTime" min-width="155" header-align="left" align="left"  sortable="custom" >
                                <template #header="scope"><span title="">令牌生效时间</span></template>
                            </el-table-column>
                            <el-table-column prop="expireTime" min-width="155" header-align="left" align="left"  sortable="custom" >
                                <template #header="scope"><span title="">令牌过期时间</span></template>
                            </el-table-column>
                            <el-table-column prop="tokenStatus" min-width="100" header-align="left" align="left"  sortable="custom" >
                                <template #header="scope"><span title="">状态</span></template>
                            </el-table-column>
                            <el-table-column prop="deviceAddr" min-width="180" header-align="left" align="left"   >
                                <template #header="scope"><span title="">设备标识</span></template>
                            </el-table-column>
                            <el-table-column prop="deviceType" min-width="100" header-align="left" align="left"  sortable="custom" >
                                <template #header="scope"><span title="">设备类型</span></template>
                            </el-table-column>
                            <el-table-column prop="deviceVersion" min-width="180" header-align="left" align="left"   >
                                <template #header="scope"><span title="">版本号</span></template>
                            </el-table-column>
                            <el-table-column prop="clientIp" min-width="180" header-align="left" align="left"   >
                                <template #header="scope"><span title="">客户端ip</span></template>
                            </el-table-column>
                            <el-table-column prop="serverIp" min-width="180" header-align="left" align="left"   >
                                <template #header="scope"><span title="">服务端ip</span></template>
                            </el-table-column>
                            <el-table-column prop="createTime" min-width="155" header-align="left" align="left"  sortable="custom" >
                                <template #header="scope"><span title="">创建时间</span></template>
                            </el-table-column>
                            <el-table-column label="操作" width="118" fixed="right">
                                <template #default="scope">
                                    <el-button type="primary" link
                                            size="default"
                                            @click="list_edit(scope.row)"
                                            
                                    >编辑</el-button>
                                    <el-divider direction="vertical"></el-divider>
                                    <el-button type="danger" link
                                            size="default"
                                            @click="list_delete(scope.row)"
                                            
                                    >删除</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </template>
                </jo-el-table>
            </div>
        </el-col>
    </el-row>

    <!-- 表单 -->
    <el-dialog v-model="formShow" :title="formTitle" :width="formWidth">
        <el-form :ref="formRef" :model="formData" label-position="right" :rules="checkRules" label-width="100px">
            <el-row :gutter="15">
                <el-col :span="24"  >
                    <el-form-item label="主键" prop="id">
                        <el-input v-model="formData.id"  placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="用户id" prop="userId">
                        <el-input-number v-model="formData.userId"  placeholder="" :min="0" :max="2147483647" :step="1" :controls="false" ></el-input-number>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="令牌" prop="token">
                        <el-input v-model="formData.token"  placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="令牌生效时间" prop="signTime">
                        <el-date-picker v-model="formData.signTime" type="date"  placeholder=""></el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="令牌过期时间" prop="expireTime">
                        <el-date-picker v-model="formData.expireTime" type="date"  placeholder=""></el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="状态" prop="tokenStatus">
                        <el-input-number v-model="formData.tokenStatus"  placeholder="" :min="0" :max="2147483647" :step="1" :controls="false" ></el-input-number>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="设备标识" prop="deviceAddr">
                        <el-input v-model="formData.deviceAddr"  placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="设备类型" prop="deviceType">
                        <el-input-number v-model="formData.deviceType"  placeholder="" :min="0" :max="2147483647" :step="1" :controls="false" ></el-input-number>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="版本号" prop="deviceVersion">
                        <el-input v-model="formData.deviceVersion"  placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="客户端ip" prop="clientIp">
                        <el-input v-model="formData.clientIp"  placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24"  >
                    <el-form-item label="服务端ip" prop="serverIp">
                        <el-input v-model="formData.serverIp"  placeholder=""></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="close_form">取消</el-button>
                <el-button type="primary" @click="form_save">确认</el-button>
            </span>
        </template>
    </el-dialog>


</div>


<!--配置信息-->
<script src="/static/js/config.js"></script>
<!--jquery-->
<script src="/static/plugin/jquery/jquery-3.3.1.js"></script>
<script src="/static/plugin/jquery/jquery.cookie.js"></script>
<!--layer-->
<!--<script src="/static/plugin/layer/layer.js"></script>-->
<!--vue-->
<script src="/static/plugin/vue/v3/vue.global.js"></script>
<script src="/static/plugin/element-ui/element-ui.js"></script>
<script src="/static/plugin/element-ui/locale/zh-cn.js"></script>
<!--[if lt IE 9]>
<script src="/static/plugin/other/html5shiv.js"></script>
<script src="/static/plugin/other/respond.min.js"></script>
<![endif]-->
<!--jo-->
<script src="/static/plugin/jo/jo.js"></script>
<script src="/static/plugin/jo/jo-adapt.js"></script>
<script src="/static/plugin/jo/jo-adapt-element-plus.js"></script>
<script src="/static/plugin/jo/jo-page-view.js"></script>
<script src="/static/plugin/jo/jo-page-form.js"></script>
<script src="/static/plugin/jo/jo-listener.js"></script>
<script src="/static/plugin/jo/jo-page-element-plus.js"></script>
<!--common-->
<script src="/static/js/common.js"></script>
<script src="/static/js/common_biz.js"></script>
<script type="text/javascript">
    // 代码生成按钮事件定义
    window.TEMP_BTN_FUNCTION = {
        methods: {
            // 自定义按钮栏事件 start
            // 自定义按钮栏事件 end

            // 自定义表格行按钮事件 start
            // 自定义表格行按钮事件 end
        }
    };
</script>
<script type="text/javascript">
    // vue参数, 留着给全局js定制用, 如果有需要定制vue参数, 则覆盖TEMP_VUE_PARAM
    window.TEMP_VUE_PARAM = {};

</script>
<script type="text/javascript">
    // vue应用构造
    const app = Vue.createApp(joEl.buildVueAppParam(window.TEMP_VUE_PARAM || {}, {
        data: function () {
            return {
                // 查询参数
                searchCondition: {},
                // 表格数据url
                tableDataUrl: '/ums/umsSession/getPage',
                // 表单详情查询url
                formQueryUrl: '/ums/umsSession/get',
                // 新增url
                formInsertUrl: '/ums/umsSession/insert',
                // 修改url
                formUpdateUrl: '/ums/umsSession/update',
                // 删除url
                deleteUrl: '/ums/umsSession/delete',
                // 校验规则
                checkRules: {
                    id: [
                        joEl.rules.required('主键不允许为空', 'blur'),
                        joEl.rules.notNaN('主键请输入数字类型', 'blur'),
                    ],
                    userId: [
                        joEl.rules.required('用户id不允许为空', 'blur'),
                        joEl.rules.notNaN('用户id请输入数字类型', 'blur'),
                    ],
                    token: [
                        joEl.rules.required('令牌不允许为空', 'blur'),
                        joEl.rules.length('令牌内容长度限制为1~128', 'blur', 128),
                    ],
                    signTime: [
                        joEl.rules.required('令牌生效时间不允许为空', 'blur'),
                    ],
                    expireTime: [
                        joEl.rules.required('令牌过期时间不允许为空', 'blur'),
                    ],
                    tokenStatus: [
                        joEl.rules.required('状态不允许为空', 'blur'),
                        joEl.rules.notNaN('状态请输入数字类型', 'blur'),
                    ],
                    deviceAddr: [
                        joEl.rules.required('设备标识不允许为空', 'blur'),
                        joEl.rules.length('设备标识内容长度限制为1~128', 'blur', 128),
                    ],
                    deviceType: [
                        joEl.rules.required('设备类型不允许为空', 'blur'),
                        joEl.rules.notNaN('设备类型请输入数字类型', 'blur'),
                    ],
                    deviceVersion: [
                        joEl.rules.required('版本号不允许为空', 'blur'),
                        joEl.rules.length('版本号内容长度限制为1~128', 'blur', 128),
                    ],
                    clientIp: [
                        joEl.rules.required('客户端ip不允许为空', 'blur'),
                        joEl.rules.length('客户端ip内容长度限制为1~128', 'blur', 128),
                    ],
                    serverIp: [
                        joEl.rules.required('服务端ip不允许为空', 'blur'),
                        joEl.rules.length('服务端ip内容长度限制为1~128', 'blur', 128),
                    ],
                },

            }
        }
        , computed: {}
        , methods: {
            // 新增表单数据初始化前的处理
            handle_form_init_data_add(data) {
            },
            // 编辑表单数据初始化前的处理
            handle_form_init_data_edit(data) {
            },

        }
        , mounted() {

        }
        , setup() {

        }
    }, window.TEMP_BTN_FUNCTION || {}, joEl.VUE_COMMON_VIEW, joEl.VUE_COMMON));
    app.use(ElementPlus, {locale: ElementPlusLocaleZhCn});
    app.use(joEl);

    var appVM = app.mount("#app");
</script>

</body>
</html>
